package utils

import "github.com/gin-gonic/gin"

type ReturnMessage struct {
	Codetype int`json:"codetype"` //1：正确 2：错误 3：未知错误
	Message string `json:"message"`
	Usertoken string `json:"usertoken"`
	Userinformation ReturnMessageUserInformation `json:"userinformation"`
	
}
type ReturnMessageUserInformation struct {
	User_image_ulr           string `json:"userimageulr"`//用户头像地址
	User_Identity            string `json:"useridentity"`//用户身份
	Where_the_user_logged_in  string`json:"Wheretheuserloggedin"`//用户登录地址
	User_login_time          string `json:"userlogintime"`//用户登录时间
	Black_list_and_whitelist bool`json:"blacklistandwhitelist"`//黑白名单
	AIGlossary []string    `json:"aiglossary"`//ai触发词条
	UserAccountNumber string `json:"useraccountnumber"`//用户账号名字
}
func SendMessage(codetype int,code int ,message string,usertoken string, this *gin.Context) {
		msg:=ReturnMessage{
			Codetype: codetype,
			Message: message,
			Usertoken: usertoken,
			}
			this.JSON(code,msg)
}
func SendUserInformation(codetype int,code int ,user ReturnMessageUserInformation, this *gin.Context) {
		msg:=ReturnMessage{
			Codetype: codetype,
			Userinformation: user,
			}
			this.JSON(code,msg)
}
